﻿
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="bookmeetprototype.browseb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"><div style="padding:0px 0px 30px 60px;background-color:#ffffff;border-right:2px solid black;border-left:2px solid black;border-top:2px solid black;">
    <h1>Browse Our Books!</h1>Here is the complete list of books our members are 
    reading! (Updated regularly)
    </div>
  <div class="gridviewlist">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="booklist" DataKeyNames="ID" GridLines="None" 
        CssClass="mGrid" PagerStyle-CssClass="pgr" 
    AlternatingRowStyle-CssClass="alt" AllowSorting="True" EmptyDataText="N/A" 
            Font-Names="Arial" ForeColor="White" HorizontalAlign="Center" Width="640px" 
            Font-Size="Small">
<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
        <Columns>
        
            <asp:TemplateField>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "detail.aspx?ID=" + Eval("ID").ToString() %>' ><asp:Image ID="Image1" CssClass="templateimagefield" NullImageUrl="~/img/no_image.jpg" runat="server" ImageUrl='<%# Eval("imgurl") %>' /></asp:HyperLink>
                </ItemTemplate>
  
            </asp:TemplateField>
        
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
            <asp:BoundField DataField="AverageRating" HeaderText="Community Rating" 
                SortExpression="AverageRating" />
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="detail.aspx?ID={0}" Text="Details" />
            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="ID" Visible="False" />
        </Columns>

        <HeaderStyle CssClass="gridviewheadtext" />

<PagerStyle CssClass="pgr"></PagerStyle>
    </asp:GridView>
    <asp:SqlDataSource ID="booklist" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BookMeetConnString %>" 
        ProviderName="<%$ ConnectionStrings:BookMeetConnString.ProviderName %>" 
        
            
            
        SelectCommand="SELECT [Title], [Author], [PublicationDate], [Pages], [Publisher], [AverageRating], [imgurl], [thumburl], [ID] FROM [booklist]">
    </asp:SqlDataSource>
 </div>
</asp:Content>
